﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@page import="com.lmpop.trade.ts_custclass.*" %>
<%@page import="com.lmpop.trade.ti_custlevel.*" %>

<%
  	String cust_id="";
  	if(request.getParameter("cust_id")!=null) cust_id = request.getParameter("cust_id");
	
	String oper_person="";	
	if( session.getAttribute("session_user_id") != null ){
		oper_person = session.getAttribute("session_user_id").toString();
	}	
	Ti_custlevelInfo custLevelInfo = new Ti_custlevelInfo();
	List list = custLevelInfo.getListByPk(cust_id);
	String cust_class = "";
	String cust_start_date = "";
	String cust_end_date = "";
	if(list != null && list.size() > 0){
		Hashtable map = (Hashtable)list.get(0);
		if(map.get("cust_class") != null && !map.get("cust_class").toString().equals("")) cust_class = map.get("cust_class").toString();
		if(map.get("cust_start_date") != null && !map.get("cust_start_date").toString().equals("")) cust_start_date = map.get("cust_start_date").toString();
		if(map.get("cust_end_date") != null && !map.get("cust_end_date").toString().equals("")) cust_end_date = map.get("cust_end_date").toString();
	}
	
	if(cust_start_date.length() > 11){
		cust_start_date = cust_start_date.substring(0,10);
	}
	if(cust_end_date.length() > 11){
		cust_end_date = cust_end_date.substring(0,10);
	}	
	String selectStr = new Ts_custclassInfo().getSelCustClass(cust_class);
%>
	
<html>
  <head>
    
    <title>企业用户级别修改</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="js_commen.js"></script>
	<script language="javascript" type="text/javascript" src="/program/plugins/calendar/WdatePicker.js"></script>
	<script type='text/javascript' src='js_customer.js'></script>
</head>

<body>	
	<h1>修改企业用户级别</h1>
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table  id="levelInfo"   name="levelInfo" width="100%" class="listtab" cellpadding="1" cellspacing="1" border="0" >

			<tr>
				<td align="right" width="10%">
					级别名称:
				</td  >
				<td width="30%">
				<select  name="cust_class" id="cust_class"   width="30">
				<%=selectStr%>
				</select>
				</td>
			</tr>
			
			
			<tr>
				<td align="right" width="10%">
					服务开始时间:
				</td>
				<td>
				
				<input name="cust_start_date" type="text" id="cust_start_date" class="Wdate" value="<%=cust_start_date%>" onclick="WdatePicker({maxDate:'#F{$dp.$D(\'cust_end_date\',{d:-1})}',readOnly:true})" size="15" />
				
				</td>
			</tr>	
			
			<tr>
				<td align="right" width="10%">
					服务结束时间:
				</td>
				
				<td>
					<input name="cust_end_date" id="cust_end_date" type="text" class="Wdate" value="<%=cust_end_date%>" onclick="WdatePicker({minDate:'#F{$dp.$D(\'cust_start_date\',{d:1})}',readOnly:true})" size="15"/>
				</td>
			</tr>	
			
			
			
				
			
</table>

	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="4733" />
				<input name="cust_oper_person" id="cust_oper_person" value="<%=oper_person%>" type="hidden" />
				<input type="hidden" name="cust_id" id="cust_id" value="<%=cust_id%>" />			
				<input type="button"   class="buttoncss" name="tradeSub" onclick="return submitCustForm()" value="提交" />&nbsp;&nbsp;
				<input type="button"   class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
</form>
</body>

</html>